<?php

namespace SL\APIBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
 * Lot
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="SL\APIBundle\Entity\LotRepository")
 */
class Lot
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="indice", type="integer")
     */
    private $indice;

    /**
     * @var string
     *
     * @ORM\Column(name="designation", type="string", length=255)
     */
    private $designation;
	
	/**
     * @ORM\OneToOne(targetEntity="SL\APIBundle\Entity\User", inversedBy="lot")
     **/
	private $user;
	
	/**
     * @ORM\ManyToOne(targetEntity="SL\APIBundle\Entity\Projet", inversedBy="lots")
	 * @ORM\JoinColumn(nullable=false)
     */
	private $projet;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set indice
     *
     * @param integer $indice
     * @return Lot
     */
    public function setIndice($indice)
    {
        $this->indice = $indice;
    
        return $this;
    }

    /**
     * Get indice
     *
     * @return integer 
     */
    public function getIndice()
    {
        return $this->indice;
    }

    /**
     * Set designation
     *
     * @param string $designation
     * @return Lot
     */
    public function setDesignation($designation)
    {
        $this->designation = $designation;
    
        return $this;
    }

    /**
     * Get designation
     *
     * @return string 
     */
    public function getDesignation()
    {
        return $this->designation;
    }

    /**
     * Set user
     *
     * @param \SL\APIBundle\Entity\User $user
     * @return Lot
     */
    public function setUser(\SL\APIBundle\Entity\User $user = null)
    {
        $this->user = $user;
    
        return $this;
    }

    /**
     * Get user
     *
     * @return \SL\APIBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Set projet
     *
     * @param \SL\APIBundle\Entity\Projet $projet
     * @return Lot
     */
    public function setProjet(\SL\APIBundle\Entity\Projet $projet)
    {
        $this->projet = $projet;
    
        return $this;
    }

    /**
     * Get projet
     *
     * @return \SL\APIBundle\Entity\Projet 
     */
    public function getProjet()
    {
        return $this->projet;
    }
}